package com.cskaoyan.mapper;

import com.cskaoyan.bean.user.Address;
import com.cskaoyan.bean.user.AddressExample;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AddressMapper {
    long countByExample(AddressExample example);

    int deleteByExample(AddressExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Address record);

    int insertSelective(Address record);

    List<Address> selectByExample(AddressExample example);

    Address selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Address record, @Param("example") AddressExample example);

    int updateByExample(@Param("record") Address record, @Param("example") AddressExample example);

    int updateByPrimaryKeySelective(Address record);

    int updateByPrimaryKey(Address record);

    Address getAddress(Integer id);

    List<Address> getAddresslist(Integer userId);

    int save(String addressDetail, String areaCode, Integer provinceId, Integer cityId, Integer countyId, Boolean isDefault, String name, String tel,String updateTime,int id);

    int delete(int id,String updateTime);

    int saveAdd(String addressDetail, int userId,String areaCode, Integer provinceId, Integer cityId, Integer countyId, Boolean isDefault, String name, String tel, String addTime);

    int selectTotal(int useId);

    int updateIsDefault(Integer isDefaultId);



    Integer selectIdbyDefault();
}